#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMessageBox>
#include <QTextStream>
#include <QFileDialog>
#include "subWidget.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE



class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
private slots:
    // 文件
    void doProcessTriggeredByNew(bool);
    void doProcessTriggeredByOpen(bool);
    void doProcessTriggeredByUTF_8(bool);
    void doProcessTriggeredByGB2312(bool);
    void doProcessTriggeredBySave(bool);
    void doProcessTriggeredBySaveAs(bool);
    void doProcessTriggeredByExit(bool);

    // 编辑
    void doProcessTriggeredByRedo(bool);
    void doProcessTriggeredByUndo(bool);
    void doProcessTriggeredByCut(bool);
    void doProcessTriggeredByCopy(bool);
    void doProcessTriggeredByPaste(bool);
    void doProcessTriggeredByFind(bool);
    void doProcessTriggeredByReplace(bool);

    // 窗体
    void doProcessTriggeredByClose(bool);
    void doProcessTriggeredByCloseAll(bool);
    void doProcessTriggeredByTile(bool);
    void doProcessTriggeredByCascade(bool);

    // 语言
    void doProcessTriggeredByCpp(bool);
    void doProcessTriggeredByJava(bool);
    void doProcessTriggeredByPython(bool);
    void doProcessTriggeredByHtml(bool);


    // 帮助
    void doProcessTriggeredByAbout(bool);
    void doProcessTriggeredByAboutQt(bool);
protected:
//    void find
private:
    Ui::MainWindow *ui;
    QString codeName;
    subWidget* getActiveChildForm();
    void Init();
};
#endif // MAINWINDOW_H
